/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package beatbox;
import java.util.Observer;
import java.util.Observable;
/**
 * @author Kyle
 */

public class ADCListenerAdapter extends Observer{
    public-read var last: Number;

    public-init var javaADCListener: ADCListener
        on replace { javaADCListener.addObserver(this); }

    override public function update (arg0 : Observable, arg1 : Object) : Void {
        FX.deferAction(
            function(): Void {
                last = javaADCListener.getLast();
            }
        )
    }
}
